<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 14:16:30 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git bisect</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Debugging">
                                Debugging                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="17cb8627006d1149675ab0c19f765a98fe2fcd0baadf644d95cf9a6c0771df43/dc" data-source="git-bisect" onmousemove="i18n(this)">git-bisect</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="9585d7d2541a1cb6fe0d517d9fd1861609742a1890d34b610149f9ede48d2988/ff" data-source="git-bisect - Use binary search to find the commit that introduced a bug" onmousemove="i18n(this)">git-bisect &mdash; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &dcy;&vcy;&ocy;&icy;&chcy;&ncy;&ycy;&jcy; &pcy;&ocy;&icy;&scy;&kcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ncy;&acy;&jcy;&tcy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &vcy;&ocy;&zcy;&ncy;&icy;&kcy;&lcy;&acy; &ocy;&shcy;&icy;&bcy;&kcy;&acy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-xml">git bisect <span class="hljs-tag">&lt;<span class="hljs-name">subcommand</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">options</span>&gt;</span></pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="503b12cab680e61d18187b02771af2f423f228c592c99cc7f3eeaa1d3ac326d1/4e" data-source="The command takes various subcommands, and different options depending on the subcommand:" onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&iecy;&tcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&iecy; &pcy;&ocy;&dcy;&kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &icy; &rcy;&acy;&zcy;&ncy;&ycy;&iecy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&ycy; &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &pcy;&ocy;&dcy;&kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;:</span></p> <div> <div> <pre class="hljs language-scss" data-highlighted="yes">git bisect start <span class="hljs-selector-attr">[--term-(new|bad)=&lt;term-new&gt; --term-(old|good)=&lt;term-old&gt;]</span>
          <span class="hljs-selector-attr">[--no-checkout]</span> <span class="hljs-selector-attr">[--first-parent]</span> <span class="hljs-selector-attr">[&lt;bad&gt; [&lt;good&gt;...]</span>] <span class="hljs-selector-attr">[--]</span> <span class="hljs-selector-attr">[&lt;paths&gt;...]</span>
git bisect (bad|new|&lt;term-new&gt;) <span class="hljs-selector-attr">[&lt;rev&gt;]</span>
git bisect (good|old|&lt;term-old&gt;) <span class="hljs-selector-attr">[&lt;rev&gt;...]</span>
git bisect terms <span class="hljs-selector-attr">[--term-good | --term-bad]</span>
git bisect skip <span class="hljs-selector-attr">[(&lt;rev&gt;|&lt;range&gt;)...]</span>
git bisect reset <span class="hljs-selector-attr">[&lt;commit&gt;]</span>
git bisect (visualize|view)
git bisect replay &lt;logfile&gt;
git bisect log
git bisect run &lt;cmd&gt; <span class="hljs-selector-attr">[&lt;arg&gt;...]</span>
git bisect help</pre> </div> </div> <p><span data-i18n="5b9aa986b5c23d99d1cbdcfbb17d3ac129b893048ebeecad8fc7628e434554e0/a5" data-source="This command uses a binary search algorithm to find which commit in your project&amp;rsquo;s history introduced a bug. You use it by first telling it a &amp;quot;bad&amp;quot; commit that is known to contain the bug, and a &amp;quot;good&amp;quot; commit that is known to be before the bug was introduced. Then &lt;code&gt;git
bisect&lt;/code&gt; picks a commit between those two endpoints and asks you whether the selected commit is &amp;quot;good&amp;quot; or &amp;quot;bad&amp;quot;. It continues narrowing down the range until it finds the exact commit that introduced the change." onmousemove="i18n(this)">&Ecy;&tcy;&acy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &acy;&lcy;&gcy;&ocy;&rcy;&icy;&tcy;&mcy; &dcy;&vcy;&ocy;&icy;&chcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ocy;&icy;&scy;&kcy;&acy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ncy;&acy;&jcy;&tcy;&icy;, &kcy;&acy;&kcy;&ocy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &vcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &pcy;&rcy;&icy;&vcy;&iecy;&lcy; &kcy; &ocy;&shcy;&icy;&bcy;&kcy;&iecy;. &Vcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&iecy; &iecy;&gcy;&ocy;, &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&yacy; &iecy;&mcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  &quot;bad&quot; , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy;, &kcy;&acy;&kcy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &ocy;&shcy;&icy;&bcy;&kcy;&ucy;, &icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  &quot;good&quot; , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy;, &kcy;&acy;&kcy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy;, &bcy;&ycy;&lcy; &scy;&dcy;&iecy;&lcy;&acy;&ncy; &dcy;&ocy; &pcy;&ocy;&yacy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &ocy;&shcy;&icy;&bcy;&kcy;&icy;. &Zcy;&acy;&tcy;&iecy;&mcy;  <code>git
bisect</code>  &vcy;&ycy;&bcy;&icy;&rcy;&acy;&iecy;&tcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy; &mcy;&iecy;&zhcy;&dcy;&ucy; &ecy;&tcy;&icy;&mcy;&icy; &dcy;&vcy;&ucy;&mcy;&yacy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ycy;&mcy;&icy; &tcy;&ocy;&chcy;&kcy;&acy;&mcy;&icy; &icy; &scy;&pcy;&rcy;&acy;&shcy;&icy;&vcy;&acy;&iecy;&tcy;, &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &lcy;&icy; &vcy;&ycy;&bcy;&rcy;&acy;&ncy;&ncy;&acy;&yacy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy;  &quot;good&quot;  &icy;&lcy;&icy;  &quot;bad&quot; . &Ocy;&ncy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&iecy;&tcy; &scy;&ucy;&zhcy;&acy;&tcy;&softcy; &dcy;&icy;&acy;&pcy;&acy;&zcy;&ocy;&ncy;, &pcy;&ocy;&kcy;&acy; &ncy;&iecy; &ncy;&acy;&jcy;&dcy;&iecy;&tcy; &tcy;&ocy;&chcy;&ncy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ncy;&iecy;&scy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&iecy;.</span></p> <p><span data-i18n="a2dffd80899a45a4cdf33fc5f2944cde7686bbdd561a22a62b625ba4a701b926/a7" data-source="In fact, &lt;code&gt;git bisect&lt;/code&gt; can be used to find the commit that changed &lt;strong&gt;any&lt;/strong&gt; property of your project; e.g., the commit that fixed a bug, or the commit that caused a benchmark&amp;rsquo;s performance to improve. To support this more general usage, the terms &amp;quot;old&amp;quot; and &amp;quot;new&amp;quot; can be used in place of &amp;quot;good&amp;quot; and &amp;quot;bad&amp;quot;, or you can choose your own terms. See section &amp;quot;Alternate terms&amp;quot; below for more information." onmousemove="i18n(this)">&Fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;,  <code>git bisect</code>  &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &pcy;&ocy;&icy;&scy;&kcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&acy; &kcy;&acy;&kcy;&ocy;&iecy;-&lcy;&icy;&bcy;&ocy; &scy;&vcy;&ocy;&jcy;&scy;&tcy;&vcy;&ocy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;; &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &icy;&scy;&pcy;&rcy;&acy;&vcy;&icy;&vcy;&shcy;&icy;&jcy; &ocy;&shcy;&icy;&bcy;&kcy;&ucy;, &icy;&lcy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&rcy;&icy;&vcy;&iecy;&lcy; &kcy; &ucy;&lcy;&ucy;&chcy;&shcy;&iecy;&ncy;&icy;&yucy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&icy; &tcy;&iecy;&scy;&tcy;&acy;. &CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&bcy;&shchcy;&iecy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;, &vcy;&mcy;&iecy;&scy;&tcy;&ocy;  &quot;good&quot;  &icy;  &quot;bad&quot;  &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&ycy;  &quot;old&quot;  &icy;  &quot;new&quot; , &icy;&lcy;&icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &vcy;&ycy;&bcy;&rcy;&acy;&tcy;&softcy; &scy;&vcy;&ocy;&icy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&iecy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&ycy;. &Dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &scy;&mcy;. &vcy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;  &quot;Alternate terms&quot;  &ncy;&icy;&zhcy;&iecy;.</span></p> <div> <h3 class="text-body-emphasis"  id="_basic_bisect_commands_start_bad_good"><span data-i18n="76f848a848bb1c24b87172818553af6dbab88525aba5589aa67414fab51efd9a/32" data-source="Basic bisect commands: start, bad, good" onmousemove="i18n(this)">&Ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ycy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &pcy;&ocy; &bcy;&icy;&scy;&scy;&iecy;&kcy;&tcy;&rcy;&icy;&scy;&iecy;: &ncy;&acy;&chcy;&acy;&lcy;&ocy;, &pcy;&lcy;&ocy;&khcy;&ocy;, &khcy;&ocy;&rcy;&ocy;&shcy;&ocy;.</span></h3> <p><span data-i18n="cb509de551ca9984aa5a64983521618a0fa21e7ed2f3d49f5510eb8fbf9377e6/36" data-source="As an example, suppose you are trying to find the commit that broke a feature that was known to work in version &lt;code&gt;v2.6.13-rc2&lt;/code&gt; of your project. You start a bisect session as follows:" onmousemove="i18n(this)">&Vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&acy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&ocy;&zhcy;&icy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &pcy;&ycy;&tcy;&acy;&iecy;&tcy;&iecy;&scy;&softcy; &ncy;&acy;&jcy;&tcy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&acy;&rcy;&ucy;&shcy;&icy;&lcy; &fcy;&ucy;&ncy;&kcy;&tscy;&icy;&yucy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy;, &kcy;&acy;&kcy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy;, &rcy;&acy;&bcy;&ocy;&tcy;&acy;&lcy;&acy; &vcy; &vcy;&iecy;&rcy;&scy;&icy;&icy;  <code>v2.6.13-rc2</code>  &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;. &Vcy;&ycy; &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&iecy; &scy;&iecy;&acy;&ncy;&scy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect start
<span class="hljs-variable">$ </span>git bisect bad                 <span class="hljs-comment" title="# Current version is bad"># &Tcy;&iecy;&kcy;&ucy;&shchcy;&acy;&yacy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &pcy;&lcy;&ocy;&khcy;&acy;&yacy;</span>
<span class="hljs-variable">$ </span>git bisect good v2.<span class="hljs-number">6.13</span>-rc2    <span class="hljs-comment" title="# v2.6.13-rc2 is known to be good"># v2.6.13-rc2 &icy;&zcy;&vcy;&iecy;&scy;&tcy;&iecy;&ncy; &kcy;&acy;&kcy; &khcy;&ocy;&rcy;&ocy;&shcy;&acy;&yacy;</span></pre> </div> </div> <p><span data-i18n="4d91aeb67167e1e0d8094ca735299ae5f6ac7f1c5f1cbe4b3ec4146d27020249/00" data-source="Once you have specified at least one bad and one good commit, &lt;code&gt;git
bisect&lt;/code&gt; selects a commit in the middle of that range of history, checks it out, and outputs something similar to the following:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy; &kcy;&acy;&kcy; &vcy;&ycy; &ucy;&kcy;&acy;&zcy;&acy;&lcy;&icy; &khcy;&ocy;&tcy;&yacy; &bcy;&ycy; &ocy;&dcy;&icy;&ncy; &pcy;&lcy;&ocy;&khcy;&ocy;&jcy; &icy; &ocy;&dcy;&icy;&ncy; &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;,  <code>git
bisect</code>  &vcy;&ycy;&bcy;&icy;&rcy;&acy;&iecy;&tcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &vcy; &scy;&iecy;&rcy;&iecy;&dcy;&icy;&ncy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &dcy;&icy;&acy;&pcy;&acy;&zcy;&ocy;&ncy;&acy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy;, &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &iecy;&gcy;&ocy; &icy; &vcy;&ycy;&vcy;&ocy;&dcy;&icy;&tcy; &chcy;&tcy;&ocy;-&tcy;&ocy; &pcy;&ocy;&khcy;&ocy;&zhcy;&iecy;&iecy; &ncy;&acy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&iecy;:</span></p> <div> <div> <pre class="hljs language-kotlin">Bisecting: <span class="hljs-number">675</span> revisions left to test after <span class="hljs-keyword">this</span> (roughly <span class="hljs-number">10</span> steps)</pre> </div> </div> <p><span data-i18n="5e0a6cc3958ac2107e1e63ba4e7b18651819c59de7848ad78201753b5c454e1f/ff" data-source="You should now compile the checked-out version and test it. If that version works correctly, type" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &scy;&kcy;&ocy;&mcy;&pcy;&icy;&lcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&rcy;&scy;&icy;&yucy; &icy; &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &iecy;&iecy;. &IEcy;&scy;&lcy;&icy; &ecy;&tcy;&acy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&ocy;, &vcy;&vcy;&iecy;&dcy;&icy;&tcy;&iecy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect good</pre> </div> </div> <p><span data-i18n="9b6868c2346208d80c5d03978de3a56b21d9483a455b966faf7cf678b685b195/5d" data-source="If that version is broken, type" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ecy;&tcy;&acy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &ncy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;, &vcy;&vcy;&iecy;&dcy;&icy;&tcy;&iecy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect bad</pre> </div> </div> <p><span data-i18n="1e4397040a74c1a7054a2c62b9eb001e23298ab7be5efce0ea37ce803f3843ce/d9" data-source="Then &lt;code&gt;git bisect&lt;/code&gt; will respond with something like" onmousemove="i18n(this)">&Tcy;&ocy;&gcy;&dcy;&acy;  <code>git bisect</code>  &ocy;&tcy;&vcy;&iecy;&tcy;&icy;&tcy; &chcy;&tcy;&ocy;-&tcy;&ocy; &vcy;&rcy;&ocy;&dcy;&iecy;</span></p> <div> <div> <pre class="hljs language-kotlin">Bisecting: <span class="hljs-number">337</span> revisions left to test after <span class="hljs-keyword">this</span> (roughly <span class="hljs-number">9</span> steps)</pre> </div> </div> <p><span data-i18n="dbd001b3f29bd3d7d9dde114807d68aa58778fafb3be883767bb71250a13f514/4f" data-source="Keep repeating the process: compile the tree, test it, and depending on whether it is good or bad run &lt;code&gt;git bisect good&lt;/code&gt; or &lt;code&gt;git bisect bad&lt;/code&gt; to ask for the next commit that needs testing." onmousemove="i18n(this)">&Pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&jcy;&tcy;&iecy; &pcy;&ocy;&vcy;&tcy;&ocy;&rcy;&yacy;&tcy;&softcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;: &scy;&kcy;&ocy;&mcy;&pcy;&icy;&lcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &iecy;&gcy;&ocy; &icy;, &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &khcy;&ocy;&rcy;&ocy;&shcy;&iecy;&iecy; &ocy;&ncy;&ocy; &icy;&lcy;&icy; &pcy;&lcy;&ocy;&khcy;&ocy;&iecy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy;  <code>git bisect good</code>  &icy;&lcy;&icy;  <code>git bisect bad</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &zcy;&acy;&pcy;&rcy;&ocy;&scy;&icy;&tcy;&softcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &tcy;&rcy;&iecy;&bcy;&ucy;&yucy;&shchcy;&icy;&jcy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="4803d86f6fd9fac39332dcc3aa3aaa48202b39fae2d5d519ce36ec19ed9e486b/70" data-source="Eventually there will be no more revisions left to inspect, and the command will print out a description of the first bad commit. The reference &lt;code&gt;refs/bisect/bad&lt;/code&gt; will be left pointing at that commit." onmousemove="i18n(this)">&Vcy; &kcy;&ocy;&ncy;&tscy;&iecy; &kcy;&ocy;&ncy;&tscy;&ocy;&vcy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&jcy; &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy; &ocy;&scy;&tcy;&acy;&ncy;&iecy;&tcy;&scy;&yacy;, &icy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &rcy;&acy;&scy;&pcy;&iecy;&chcy;&acy;&tcy;&acy;&iecy;&tcy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &pcy;&iecy;&rcy;&vcy;&ocy;&gcy;&ocy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&ncy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;. &Scy;&scy;&ycy;&lcy;&kcy;&acy;  <code>refs/bisect/bad</code>  &ocy;&scy;&tcy;&acy;&ncy;&iecy;&tcy;&scy;&yacy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&shchcy;&iecy;&jcy; &ncy;&acy; &ecy;&tcy;&ocy;&tcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_bisect_reset"><span data-i18n="e365285f78e99d1c86fdbd77dd8f62550925e427fabd5d0ed7492723ebb5ba31/9a" data-source="Bisect reset" onmousemove="i18n(this)">Bisect reset</span></h3> <p><span data-i18n="c56df233a5e467113886f784fd6c1546e44cf4f0a3080e6c666d06162bb5fa4c/01" data-source="After a bisect session, to clean up the bisection state and return to the original HEAD, issue the following command:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &scy;&iecy;&acy;&ncy;&scy;&acy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&chcy;&icy;&scy;&tcy;&icy;&tcy;&softcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &icy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;&scy;&yacy; &kcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy;&ucy; HEAD, &vcy;&vcy;&iecy;&dcy;&icy;&tcy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-perl">$ git bisect <span class="hljs-keyword">reset</span></pre> </div> </div> <p><span data-i18n="43208cad05b34619a45890969c493f14ceaa437f9be98682e4a6d040fe04b82c/ac" data-source="By default, this will return your tree to the commit that was checked out before &lt;code&gt;git bisect start&lt;/code&gt;. (A new &lt;code&gt;git bisect start&lt;/code&gt; will also do that, as it cleans up the old bisection state.)" onmousemove="i18n(this)">&Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &ecy;&tcy;&ocy; &vcy;&iecy;&rcy;&ncy;&iecy;&tcy; &vcy;&acy;&shcy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &kcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &bcy;&ycy;&lcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy; &dcy;&ocy;  <code>git bisect start</code> . (&Ncy;&ocy;&vcy;&ycy;&jcy;  <code>git bisect start</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ocy;&ncy; &ocy;&chcy;&icy;&shchcy;&acy;&iecy;&tcy; &scy;&tcy;&acy;&rcy;&ocy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;.)</span></p> <p><span data-i18n="579df05ab77728c49b57653d06b344066fb63064a25fb016a4e80e285892deed/80" data-source="With an optional argument, you can return to a different commit instead:" onmousemove="i18n(this)">&Scy; &ncy;&iecy;&ocy;&bcy;&yacy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&mcy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&mcy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;&scy;&yacy; &kcy; &dcy;&rcy;&ucy;&gcy;&ocy;&mcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-xml">$ git bisect reset <span class="hljs-tag">&lt;<span class="hljs-name">commit</span>&gt;</span></pre> </div> </div> <p><span data-i18n="227fb1c4f7f892d006d6fdbb4365df0be2611bab9eb69a0fe5aa2fcb48204ddc/e1" data-source="For example, &lt;code&gt;git bisect reset bisect/bad&lt;/code&gt; will check out the first bad revision, while &lt;code&gt;git bisect reset HEAD&lt;/code&gt; will leave you on the current bisection commit and avoid switching commits at all." onmousemove="i18n(this)">&Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>git bisect reset bisect/bad</code>  &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy; &pcy;&iecy;&rcy;&vcy;&ucy;&yucy; &pcy;&lcy;&ocy;&khcy;&ucy;&yucy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&yucy;, &acy;  <code>git bisect reset HEAD</code>  &ocy;&scy;&tcy;&acy;&vcy;&icy;&tcy; &vcy;&acy;&scy; &ncy;&acy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&mcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&iecy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &icy; &vcy;&ocy;&ocy;&bcy;&shchcy;&iecy; &icy;&zcy;&bcy;&iecy;&zhcy;&icy;&tcy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_alternate_terms"><span data-i18n="7e20a68436daabb158a0511a827b9c63768c2e72ef7d67a55facaa3035d7bada/67" data-source="Alternate terms" onmousemove="i18n(this)">Alternate terms</span></h3> <p><span data-i18n="8a51ffe5598958dd8ebbb3674150981f2597fb0350106ac2cdcf6e0680294cf5/8a" data-source="Sometimes you are not looking for the commit that introduced a breakage, but rather for a commit that caused a change between some other &amp;quot;old&amp;quot; state and &amp;quot;new&amp;quot; state. For example, you might be looking for the commit that introduced a particular fix. Or you might be looking for the first commit in which the source-code filenames were finally all converted to your company&amp;rsquo;s naming standard. Or whatever." onmousemove="i18n(this)">&Icy;&ncy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &icy;&shchcy;&iecy;&tcy;&iecy; &ncy;&iecy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &pcy;&rcy;&icy;&vcy;&iecy;&lcy;&acy; &kcy; &pcy;&ocy;&lcy;&ocy;&mcy;&kcy;&iecy;, &acy; &scy;&kcy;&ocy;&rcy;&iecy;&iecy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &vcy;&ycy;&zcy;&vcy;&acy;&lcy;&acy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&iecy; &mcy;&iecy;&zhcy;&dcy;&ucy; &kcy;&acy;&kcy;&icy;&mcy;-&lcy;&icy;&bcy;&ocy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy;  &quot;old&quot;  &icy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy;  &quot;new&quot; . &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&kcy;&acy;&tcy;&softcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&jcy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy;. &Icy;&lcy;&icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&kcy;&acy;&tcy;&softcy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &icy;&mcy;&iecy;&ncy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &kcy;&ocy;&dcy;&acy; &bcy;&ycy;&lcy;&icy; &ncy;&acy;&kcy;&ocy;&ncy;&iecy;&tscy; &pcy;&rcy;&iecy;&ocy;&bcy;&rcy;&acy;&zcy;&ocy;&vcy;&acy;&ncy;&ycy; &vcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy; &icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &vcy;&acy;&shcy;&iecy;&jcy; &kcy;&ocy;&mcy;&pcy;&acy;&ncy;&icy;&icy;. &Icy;&lcy;&icy; &chcy;&tcy;&ocy;-&tcy;&ocy; &iecy;&shchcy;&iecy;.</span></p> <p><span data-i18n="52cef17dc0d7f6dd519c770cab9eb2f1958380b737a5a6ad3e8323ac4ec35e86/bc" data-source="In such cases it can be very confusing to use the terms &amp;quot;good&amp;quot; and &amp;quot;bad&amp;quot; to refer to &amp;quot;the state before the change&amp;quot; and &amp;quot;the state after the change&amp;quot;. So instead, you can use the terms &amp;quot;old&amp;quot; and &amp;quot;new&amp;quot;, respectively, in place of &amp;quot;good&amp;quot; and &amp;quot;bad&amp;quot;. (But note that you cannot mix &amp;quot;good&amp;quot; and &amp;quot;bad&amp;quot; with &amp;quot;old&amp;quot; and &amp;quot;new&amp;quot; in a single session.)" onmousemove="i18n(this)">&Vcy; &tcy;&acy;&kcy;&icy;&khcy; &scy;&lcy;&ucy;&chcy;&acy;&yacy;&khcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &ocy;&chcy;&iecy;&ncy;&softcy; &zcy;&acy;&pcy;&ucy;&tcy;&acy;&ncy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&ycy;  &quot;good&quot;  &icy;  &quot;bad&quot;  &dcy;&lcy;&yacy; &ocy;&bcy;&ocy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy;  &quot;the state before the change&quot;  &icy;  &quot;the state after the change&quot; . &Pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy;  &quot;good&quot;  &icy;  &quot;bad&quot;  &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&ycy;  &quot;old&quot;  &icy;  &quot;new&quot;  &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;. (&Ncy;&ocy; &ucy;&chcy;&tcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &vcy;&ycy; &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&ocy;&vcy;&mcy;&iecy;&shchcy;&acy;&tcy;&softcy;  &quot;good&quot;  &icy;  &quot;bad&quot;  &scy;  &quot;old&quot;  &icy;  &quot;new&quot;  &vcy; &ocy;&dcy;&ncy;&ocy;&mcy; &scy;&iecy;&acy;&ncy;&scy;&iecy;.)</span></p> <p><span data-i18n="9c44976b3012d0f55978ecce2826e6da7d7f32895b7ad18bff525e459d3d3965/6e" data-source="In this more general usage, you provide &lt;code&gt;git bisect&lt;/code&gt; with a &amp;quot;new&amp;quot; commit that has some property and an &amp;quot;old&amp;quot; commit that doesn&amp;rsquo;t have that property. Each time &lt;code&gt;git bisect&lt;/code&gt; checks out a commit, you test if that commit has the property. If it does, mark the commit as &amp;quot;new&amp;quot;; otherwise, mark it as &amp;quot;old&amp;quot;. When the bisection is done, &lt;code&gt;git bisect&lt;/code&gt; will report which commit introduced the property." onmousemove="i18n(this)">&Vcy; &ecy;&tcy;&ocy;&mcy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&bcy;&shchcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &vcy;&ycy; &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy;&iecy;  <code>git bisect</code>  &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;  &quot;new&quot; , &icy;&mcy;&iecy;&yucy;&shchcy;&ucy;&yucy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &scy;&vcy;&ocy;&jcy;&scy;&tcy;&vcy;&ocy;, &icy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;  &quot;old&quot; , &ncy;&iecy; &icy;&mcy;&iecy;&yucy;&shchcy;&ucy;&yucy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&vcy;&ocy;&jcy;&scy;&tcy;&vcy;&acy;. &Kcy;&acy;&zhcy;&dcy;&ycy;&jcy; &rcy;&acy;&zcy;, &kcy;&ocy;&gcy;&dcy;&acy;  <code>git bisect</code>  &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;, &vcy;&ycy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy;&iecy;, &icy;&mcy;&iecy;&iecy;&tcy; &lcy;&icy; &ecy;&tcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy; &scy;&vcy;&ocy;&jcy;&scy;&tcy;&vcy;&ocy;. &IEcy;&scy;&lcy;&icy; &dcy;&acy;, &ocy;&tcy;&mcy;&iecy;&tcy;&softcy;&tcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &kcy;&acy;&kcy;  &quot;new&quot; ; &vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ocy;&tcy;&mcy;&iecy;&tcy;&softcy;&tcy;&iecy; &iecy;&gcy;&ocy; &kcy;&acy;&kcy;  &quot;old&quot; . &Kcy;&ocy;&gcy;&dcy;&acy; &dcy;&iecy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &bcy;&ucy;&dcy;&iecy;&tcy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ocy;,  <code>git bisect</code>  &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;, &kcy;&acy;&kcy;&ocy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &vcy;&vcy;&iecy;&lcy; &ecy;&tcy;&ocy; &scy;&vcy;&ocy;&jcy;&scy;&tcy;&vcy;&ocy;.</span></p> <p><span data-i18n="be7dd910f9bc5018ee363aef5e44471e099f2cc8e7bc15e3b3652b4afb883eaf/af" data-source="To use &amp;quot;old&amp;quot; and &amp;quot;new&amp;quot; instead of &amp;quot;good&amp;quot; and bad, you must run &lt;code&gt;git
bisect start&lt;/code&gt; without commits as argument and then run the following commands to add the commits:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  &quot;old&quot;  &icy;  &quot;new&quot;  &vcy;&mcy;&iecy;&scy;&tcy;&ocy;  &quot;good&quot;  &icy; bad, &vcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>git
bisect start</code>  &bcy;&iecy;&zcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &chcy;&tcy;&ocy;&bcy;&ycy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ycy;:</span></p> <div> <div> <pre class="hljs language-css">git bisect old <span class="hljs-selector-attr">[&lt;rev&gt;]</span></pre> </div> </div> <p><span data-i18n="be430e589db6fe25fa0e29ecc1e3681c0cf3ed68032e7aeb387197aaa70baf58/a3" data-source="to indicate that a commit was before the sought change, or" onmousemove="i18n(this)">&chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy; &pcy;&rcy;&ocy;&icy;&zcy;&ocy;&shcy;&lcy;&acy; &dcy;&ocy; &icy;&scy;&kcy;&ocy;&mcy;&ocy;&gcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &icy;&lcy;&icy;</span></p> <div> <div> <pre class="hljs language-cpp">git bisect <span class="hljs-keyword">new</span> [&lt;rev&gt;...]</pre> </div> </div> <p><span data-i18n="0b0b960ec6329d8fa072ac88001df0a954c6c0b7c2ddefe98c23d45789ebde93/17" data-source="to indicate that it was after." onmousemove="i18n(this)">&chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &bcy;&ycy;&lcy;&ocy; &pcy;&ocy;&scy;&lcy;&iecy;.</span></p> <p><span data-i18n="ef13ffdd0c7b2418710e294e1308718b8761cecb5f5f346a1aabe8679d87b0a0/fc" data-source="To get a reminder of the currently used terms, use" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &ncy;&acy;&pcy;&ocy;&mcy;&icy;&ncy;&acy;&ncy;&icy;&iecy; &ocy;&bcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&khcy; &vcy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&acy;&khcy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;</span></p> <div> <div> <pre class="hljs language-undefined">git bisect terms</pre> </div> </div> <p><span data-i18n="8c459a514cfa14148cb8bebd24cf3d5e45ac9053d538c11605cff7c1647696ad/5c" data-source="You can get just the old (respectively new) term with &lt;code&gt;git bisect terms
--term-old&lt;/code&gt; or &lt;code&gt;git bisect terms --term-good&lt;/code&gt;." onmousemove="i18n(this)">&Pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&tcy;&acy;&rcy;&ycy;&jcy; (&scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy; &ncy;&ocy;&vcy;&ycy;&jcy;) &tcy;&iecy;&rcy;&mcy;&icy;&ncy; &mcy;&ocy;&zhcy;&ncy;&ocy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git bisect terms
--term-old</code>  &icy;&lcy;&icy;  <code>git bisect terms --term-good</code> .</span></p> <p><span data-i18n="c3753de1448ab4a17be1e7261780f091176e425cae870f80c5fbe9e7503d1adc/cf" data-source="If you would like to use your own terms instead of &amp;quot;bad&amp;quot;/&amp;quot;good&amp;quot; or &amp;quot;new&amp;quot;/&amp;quot;old&amp;quot;, you can choose any names you like (except existing bisect subcommands like &lt;code&gt;reset&lt;/code&gt;, &lt;code&gt;start&lt;/code&gt;, &amp;hellip;&amp;ZeroWidthSpace;) by starting the bisection using" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&vcy;&ocy;&icy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&iecy; &tcy;&iecy;&rcy;&mcy;&icy;&ncy;&ycy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy;  &quot;bad&quot; / &quot;good&quot;  &icy;&lcy;&icy;  &quot;new&quot; / &quot;old&quot; , &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &vcy;&ycy;&bcy;&rcy;&acy;&tcy;&softcy; &lcy;&yucy;&bcy;&ycy;&iecy; &icy;&mcy;&iecy;&ncy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&acy;&mcy; &ncy;&rcy;&acy;&vcy;&yacy;&tcy;&scy;&yacy; (&kcy;&rcy;&ocy;&mcy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&khcy; &pcy;&ocy;&dcy;&kcy;&ocy;&mcy;&acy;&ncy;&dcy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;, &tcy;&acy;&kcy;&icy;&khcy; &kcy;&acy;&kcy;  <code>reset</code>  ,  <code>start</code>  , &hellip;), &ncy;&acy;&chcy;&acy;&vcy; &dcy;&iecy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;</span></p> <div> <div> <pre class="hljs language-cpp">git bisect start --term-old &lt;term-old&gt; --term-<span class="hljs-keyword">new</span> &lt;term-<span class="hljs-keyword">new</span>&gt;</pre> </div> </div> <p><span data-i18n="56306ca99e5e73fcdd3371979f0090a2c4bd2daae58921ef17f1081e967ece17/83" data-source="For example, if you are looking for a commit that introduced a performance regression, you might use" onmousemove="i18n(this)">&Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &icy;&shchcy;&iecy;&tcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&rcy;&icy;&vcy;&iecy;&lcy; &kcy; &scy;&ncy;&icy;&zhcy;&iecy;&ncy;&icy;&yucy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&icy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-css">git bisect start <span class="hljs-attr">--term-old</span> fast <span class="hljs-attr">--term-new</span> slow</pre> </div> </div> <p><span data-i18n="6d75c3816eccfdbabcc8af2b85e1762894c8bf0613d37a1ba18ec4ef6a79a4b2/1a" data-source="Or if you are looking for the commit that fixed a bug, you might use" onmousemove="i18n(this)">&Icy;&lcy;&icy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &icy;&shchcy;&iecy;&tcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &icy;&scy;&pcy;&rcy;&acy;&vcy;&icy;&vcy;&shcy;&icy;&jcy; &ocy;&shcy;&icy;&bcy;&kcy;&ucy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-scss">git bisect start <span class="hljs-attr">--term-new</span> fixed <span class="hljs-attr">--term-old</span> broken</pre> </div> </div> <p><span data-i18n="603c5999c9aefc62416389a5b7e81f9ff7bb3ed422d2a4b2b1b0a53191b195f9/38" data-source="Then, use &lt;code&gt;git bisect &amp;lt;term-old&amp;gt;&lt;/code&gt; and &lt;code&gt;git bisect &amp;lt;term-new&amp;gt;&lt;/code&gt; instead of &lt;code&gt;git bisect good&lt;/code&gt; and &lt;code&gt;git bisect bad&lt;/code&gt; to mark commits." onmousemove="i18n(this)">&Zcy;&acy;&tcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git bisect &lt;term-old&gt;</code>  &icy;  <code>git bisect &lt;term-new&gt;</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy;  <code>git bisect good</code>  &icy;  <code>git bisect bad</code>  &dcy;&lcy;&yacy; &mcy;&acy;&rcy;&kcy;&icy;&rcy;&ocy;&vcy;&kcy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_bisect_visualizeview"><span data-i18n="70cf9c4b5db456c540f2071a4f9f0e96da9afcf184f8c89fbfe8dc3695394bd8/14" data-source="Bisect visualize/view" onmousemove="i18n(this)">Bisect visualize/view</span></h3> <p><span data-i18n="9e562c62ffd9db160619983303cf7a9aa2160da46878c34da5afd49053a1da18/a4" data-source="To see the currently remaining suspects in &lt;code&gt;gitk&lt;/code&gt;, issue the following command during the bisection process (the subcommand &lt;code&gt;view&lt;/code&gt; can be used as an alternative to &lt;code&gt;visualize&lt;/code&gt;):" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &ocy;&scy;&tcy;&acy;&vcy;&shcy;&icy;&khcy;&scy;&yacy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &pcy;&ocy;&dcy;&ocy;&zcy;&rcy;&iecy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy; &vcy;  <code>gitk</code> , &vcy;&vcy;&iecy;&dcy;&icy;&tcy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy; &vcy;&ocy; &vcy;&rcy;&iecy;&mcy;&yacy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&acy; &dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; (&pcy;&ocy;&dcy;&kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;  <code>view</code>  &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&lcy;&softcy;&tcy;&iecy;&rcy;&ncy;&acy;&tcy;&icy;&vcy;&ycy;  <code>visualize</code> ):</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect visualize</pre> </div> </div> <p><span data-i18n="2529439cf8ea6d6dd573e1ffcdca7b5f57cf436767a6f57ff924c01adb6ade64/48" data-source="Git detects a graphical environment through various environment variables: &lt;code&gt;DISPLAY&lt;/code&gt;, which is set in X Window System environments on Unix systems. &lt;code&gt;SESSIONNAME&lt;/code&gt;, which is set under Cygwin in interactive desktop sessions. &lt;code&gt;MSYSTEM&lt;/code&gt;, which is set under Msys2 and Git for Windows. &lt;code&gt;SECURITYSESSIONID&lt;/code&gt;, which may be set on macOS in interactive desktop sessions." onmousemove="i18n(this)">Git  &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&yacy;&iecy;&tcy; &gcy;&rcy;&acy;&fcy;&icy;&chcy;&iecy;&scy;&kcy;&ucy;&yucy; &scy;&rcy;&iecy;&dcy;&ucy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&khcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ycy;&khcy; &scy;&rcy;&iecy;&dcy;&ycy;:  <code>DISPLAY</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &zcy;&acy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &scy;&rcy;&iecy;&dcy;&acy;&khcy; X Window System &vcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&acy;&khcy; Unix.  <code>SESSIONNAME</code>  , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ucy;&scy;&tcy;&acy;&ncy;&acy;&vcy;&lcy;&icy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; Cygwin &vcy; &scy;&iecy;&acy;&ncy;&scy;&acy;&khcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &scy;&tcy;&ocy;&lcy;&acy;.  <code>MSYSTEM</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ucy;&scy;&tcy;&acy;&ncy;&acy;&vcy;&lcy;&icy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; Msys2 &icy;  Git  &dcy;&lcy;&yacy; Windows.  <code>SECURITYSESSIONID</code>  , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &vcy; macOS &vcy; &scy;&iecy;&acy;&ncy;&scy;&acy;&khcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &scy;&tcy;&ocy;&lcy;&acy;.</span></p> <p><span data-i18n="60b76c0197d846e030530f76b94826b63d6121fa7d7cff99871591f91552c260/42" data-source="If none of these environment variables is set, &lt;code&gt;git log&lt;/code&gt; is used instead. You can also give command-line options such as &lt;code&gt;-p&lt;/code&gt; and &lt;code&gt;--stat&lt;/code&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &dcy;&lcy;&yacy; &ecy;&tcy;&icy;&khcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ycy;&khcy; &scy;&rcy;&iecy;&dcy;&ycy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&acy; &ZeroWidthSpace;none , &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ncy;&iecy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>git log</code> . &Vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&ycy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;, &tcy;&acy;&kcy;&icy;&iecy; &kcy;&acy;&kcy;  <code>-p</code>  &icy;  <code>--stat</code> .</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git bisect visualize --<span class="hljs-built_in">stat</span></span></pre> </div> </div> </div> <div> <h3 class="text-body-emphasis"  id="_bisect_log_and_bisect_replay"><span data-i18n="a06561c206b7464cd9aeb81cccd932d14e7239d8629af2d2bb125ae5bc004da9/1a" data-source="Bisect log and bisect replay" onmousemove="i18n(this)">&ZHcy;&ucy;&rcy;&ncy;&acy;&lcy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &icy; &pcy;&ocy;&vcy;&tcy;&ocy;&rcy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;</span></h3> <p><span data-i18n="8e086051b160b5d88db474e0faeae597e7300f8e2935fc4ff59fffc1c7eeb297/05" data-source="After having marked revisions as good or bad, issue the following command to show what has been done so far:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&icy; &ocy;&tcy;&mcy;&iecy;&chcy;&iecy;&ncy;&ycy; &kcy;&acy;&kcy; &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&iecy; &icy;&lcy;&icy; &pcy;&lcy;&ocy;&khcy;&icy;&iecy;, &vcy;&vcy;&iecy;&dcy;&icy;&tcy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &bcy;&ycy;&lcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&ncy;&ocy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git bisect <span class="hljs-built_in">log</span></span></pre> </div> </div> <p><span data-i18n="9f50037c6d530c22d7068171b453e99be8db5a1b1864d5d28868ab904695aee3/89" data-source="If you discover that you made a mistake in specifying the status of a revision, you can save the output of this command to a file, edit it to remove the incorrect entries, and then issue the following commands to return to a corrected state:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &ocy;&bcy;&ncy;&acy;&rcy;&ucy;&zhcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&lcy;&icy; &ocy;&shcy;&icy;&bcy;&kcy;&ucy; &pcy;&rcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&icy; &scy;&tcy;&acy;&tcy;&ucy;&scy;&acy; &rcy;&iecy;&dcy;&acy;&kcy;&tscy;&icy;&icy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; &vcy;&ycy;&vcy;&ocy;&dcy; &ecy;&tcy;&ocy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &vcy; &fcy;&acy;&jcy;&lcy;, &ocy;&tcy;&rcy;&iecy;&dcy;&acy;&kcy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &ncy;&iecy;&pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;&scy;&yacy; &kcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy;&ucy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yucy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect reset
<span class="hljs-variable">$ </span>git bisect replay that-file</pre> </div> </div> </div> <div> <h3 class="text-body-emphasis"  id="_avoiding_testing_a_commit"><span data-i18n="138eeb2db85d4dbfcc1d052c529f39b919c55a9618aa87807952cc6f36d6a3c5/fb" data-source="Avoiding testing a commit" onmousemove="i18n(this)">&Kcy;&acy;&kcy; &icy;&zcy;&bcy;&iecy;&zhcy;&acy;&tcy;&softcy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;</span></h3> <p><span data-i18n="01e814a5ec5c7407bfa2a00045e8831bc62503a0910ab597b4b35ea3a347fbb2/75" data-source="If, in the middle of a bisect session, you know that the suggested revision is not a good one to test (e.g. it fails to build and you know that the failure does not have anything to do with the bug you are chasing), you can manually select a nearby commit and test that one instead." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy; &scy;&iecy;&rcy;&iecy;&dcy;&icy;&ncy;&iecy; &scy;&iecy;&acy;&ncy;&scy;&acy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &vcy;&ycy; &zcy;&ncy;&acy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy; &pcy;&rcy;&iecy;&dcy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ncy;&acy;&yacy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&yacy; &ncy;&iecy; &pcy;&ocy;&dcy;&khcy;&ocy;&dcy;&icy;&tcy; &dcy;&lcy;&yacy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &iecy;&iecy; &ncy;&iecy; &ucy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&bcy;&rcy;&acy;&tcy;&softcy;, &icy; &vcy;&ycy; &zcy;&ncy;&acy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy; &ocy;&shcy;&icy;&bcy;&kcy;&acy; &ncy;&iecy; &icy;&mcy;&iecy;&iecy;&tcy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &scy; &ocy;&shcy;&icy;&bcy;&kcy;&ocy;&jcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &pcy;&rcy;&iecy;&scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy;&iecy;), &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy; &vcy;&ycy;&bcy;&rcy;&acy;&tcy;&softcy; &bcy;&lcy;&icy;&zhcy;&acy;&jcy;&shcy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &icy; &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy;.</span></p> <p><span data-i18n="652744a2ab28954bbafd780fd76c15c2bd557594532f907f10ead1989727af95/0f" data-source="For example:" onmousemove="i18n(this)">For example:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect good/bad                        <span class="hljs-comment" title="# previous round was good or bad."># &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&icy;&jcy; &rcy;&acy;&ucy;&ncy;&dcy; &bcy;&ycy;&lcy; &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&mcy; &icy;&lcy;&icy; &pcy;&lcy;&ocy;&khcy;&icy;&mcy;.</span>
<span class="hljs-title class_">Bisecting</span>: <span class="hljs-number">337</span> revisions left to test after this (roughly <span class="hljs-number">9</span> steps)
<span class="hljs-variable">$ </span>git bisect visualize                        <span class="hljs-comment" title="# oops, that is uninteresting."># &ocy;&jcy;, &ecy;&tcy;&ocy; &ncy;&iecy;&icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&ocy;.</span>
<span class="hljs-variable">$ </span>git reset --hard <span class="hljs-variable constant_">HEAD</span>~<span class="hljs-number">3</span>                <span class="hljs-comment" title="# try 3 revisions before what"># &pcy;&ocy;&pcy;&rcy;&ocy;&bcy;&ucy;&jcy; 3 &rcy;&iecy;&vcy;&icy;&zcy;&icy;&icy; &pcy;&iecy;&rcy;&iecy;&dcy; &chcy;&iecy;&mcy;</span>
                                        <span class="hljs-comment" title="# was suggested"># &bcy;&ycy;&lcy;&ocy; &pcy;&rcy;&iecy;&dcy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ocy;</span></pre> </div> </div> <p><span data-i18n="7ab82229eeed89da34b03c66f626076d29f318c659b5afef981d98ca72cde417/66" data-source="Then compile and test the chosen revision, and afterwards mark the revision as good or bad in the usual manner." onmousemove="i18n(this)">&Zcy;&acy;&tcy;&iecy;&mcy; &scy;&kcy;&ocy;&mcy;&pcy;&icy;&lcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &icy; &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &vcy;&ycy;&bcy;&rcy;&acy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&rcy;&scy;&icy;&yucy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &ocy;&tcy;&mcy;&iecy;&tcy;&softcy;&tcy;&iecy; &iecy;&iecy; &kcy;&acy;&kcy; &khcy;&ocy;&rcy;&ocy;&shcy;&ucy;&yucy; &icy;&lcy;&icy; &pcy;&lcy;&ocy;&khcy;&ucy;&yucy; &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&mcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy;&ocy;&mcy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_bisect_skip"><span data-i18n="cb059774dbfc436d150e48f1ea69f33a4084c0a59487fd6e90453040e338246b/c5" data-source="Bisect skip" onmousemove="i18n(this)">Bisect skip</span></h3> <p><span data-i18n="726c8594d6ab048feb405811cba32b8353934035fed9ed67fcef8ebd6a1541e8/90" data-source="Instead of choosing a nearby commit by yourself, you can ask Git to do it for you by issuing the command:" onmousemove="i18n(this)">&Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&acy;&mcy;&ocy;&scy;&tcy;&ocy;&yacy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &vcy;&ycy;&bcy;&icy;&rcy;&acy;&tcy;&softcy; &bcy;&lcy;&icy;&zhcy;&acy;&jcy;&shcy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&ocy;&pcy;&rcy;&ocy;&scy;&icy;&tcy;&softcy;  Git  &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &zcy;&acy; &vcy;&acy;&scy;, &vcy;&vcy;&iecy;&dcy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect skip                 <span class="hljs-comment" title="# Current version cannot be tested"># &Tcy;&iecy;&kcy;&ucy;&shchcy;&acy;&yacy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&acy;</span></pre> </div> </div> <p><span data-i18n="e566f45409335576c3736e680da82a27bc05bb840cdde37e3214e360bddba284/1b" data-source="However, if you skip a commit adjacent to the one you are looking for, Git will be unable to tell exactly which of those commits was the first bad one." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &scy;&ocy;&scy;&iecy;&dcy;&ncy;&icy;&jcy; &scy; &tcy;&iecy;&mcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy; &icy;&shchcy;&iecy;&tcy;&iecy;,  Git  &ncy;&iecy; &scy;&mcy;&ocy;&zhcy;&iecy;&tcy; &tcy;&ocy;&chcy;&ncy;&ocy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy;, &kcy;&acy;&kcy;&ocy;&jcy; &icy;&zcy; &ecy;&tcy;&icy;&khcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy; &bcy;&ycy;&lcy; &pcy;&iecy;&rcy;&vcy;&ycy;&mcy; &pcy;&lcy;&ocy;&khcy;&icy;&mcy;.</span></p> <p><span data-i18n="ede19ff9186678a1079c2f81a2b292b18ac27ac1c4cc7ab3b30ca2be9cc7733b/98" data-source="You can also skip a range of commits, instead of just one commit, using range notation. For example:" onmousemove="i18n(this)">&Vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy; &dcy;&icy;&acy;&pcy;&acy;&zcy;&ocy;&ncy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy; &ocy;&bcy;&ocy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &dcy;&icy;&acy;&pcy;&acy;&zcy;&ocy;&ncy;&acy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect skip v2.<span class="hljs-number">5</span>..v2.<span class="hljs-number">6</span></pre> </div> </div> <p><span data-i18n="fb28c1ea582caf2985295956da16c990760c5c88a373568dc4959f07e1d66a6c/26" data-source="This tells the bisect process that no commit after &lt;code&gt;v2.5&lt;/code&gt;, up to and including &lt;code&gt;v2.6&lt;/code&gt;, should be tested." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ucy; bisect, &chcy;&tcy;&ocy; &ncy;&icy;&kcy;&acy;&kcy;&icy;&iecy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &pcy;&ocy;&scy;&lcy;&iecy;  <code>v2.5</code> , &vcy;&pcy;&lcy;&ocy;&tcy;&softcy; &dcy;&ocy;  <code>v2.6</code>  &vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &ncy;&iecy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&tcy;&softcy;&scy;&yacy;.</span></p> <p><span data-i18n="736f51af47cd051e9773036066600a09032221b6bd3461610c5f83aa1a30f12a/1e" data-source="Note that if you also want to skip the first commit of the range you would issue the command:" onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;: &iecy;&scy;&lcy;&icy; &vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy; &pcy;&iecy;&rcy;&vcy;&ucy;&yucy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy; &dcy;&icy;&acy;&pcy;&acy;&zcy;&ocy;&ncy;&acy;, &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &vcy;&vcy;&iecy;&scy;&tcy;&icy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect skip v2.<span class="hljs-number">5</span> v2.<span class="hljs-number">5</span>..v2.<span class="hljs-number">6</span></pre> </div> </div> <p><span data-i18n="746c9e4adb7b61f32f93122b4d90c13239b8183291a08b27c652e0d843b1aebc/c3" data-source="This tells the bisect process that the commits between &lt;code&gt;v2.5&lt;/code&gt; and &lt;code&gt;v2.6&lt;/code&gt; (inclusive) should be skipped." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&ucy; bisect, &chcy;&tcy;&ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &mcy;&iecy;&zhcy;&dcy;&ucy;  <code>v2.5</code>  &icy;  <code>v2.6</code>  (&vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;) &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_cutting_down_bisection_by_giving_more_parameters_to_bisect_start"><span data-i18n="eb738eaa6bd1f48332a0755bf2739bf2cf88ac93627677a668f756f7469a92ad/6c" data-source="Cutting down bisection by giving more parameters to bisect start" onmousemove="i18n(this)">&Scy;&ocy;&kcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&iecy; &dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &zcy;&acy; &scy;&chcy;&iecy;&tcy; &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy;&gcy;&ocy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&acy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&ocy;&vcy; &dcy;&lcy;&yacy; &ncy;&acy;&chcy;&acy;&lcy;&acy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;.</span></h3> <p><span data-i18n="63429764a4f28f70f20db5334a36f503413240380e2772f680eab1b839161076/d6" data-source="You can further cut down the number of trials, if you know what part of the tree is involved in the problem you are tracking down, by specifying path parameters when issuing the &lt;code&gt;bisect start&lt;/code&gt; command:" onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &iecy;&shchcy;&iecy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &scy;&ocy;&kcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&ocy; &pcy;&ocy;&pcy;&ycy;&tcy;&ocy;&kcy;, &iecy;&scy;&lcy;&icy; &zcy;&ncy;&acy;&iecy;&tcy;&iecy;, &kcy;&acy;&kcy;&acy;&yacy; &chcy;&acy;&scy;&tcy;&softcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &zcy;&acy;&dcy;&iecy;&jcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&ncy;&acy; &vcy; &pcy;&rcy;&ocy;&bcy;&lcy;&iecy;&mcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy;&iecy;, &ucy;&kcy;&acy;&zcy;&acy;&vcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&ycy; &pcy;&ucy;&tcy;&icy; &pcy;&rcy;&icy; &vcy;&vcy;&ocy;&dcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>bisect start</code> :</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git bisect start -- <span class="hljs-built_in">arch</span>/i386 include/asm-i386</span></pre> </div> </div> <p><span data-i18n="3b7e0bfed6bb11d9520c8e5147aa1bab3b1e758e8da5a03a816e768a83a8b4ca/9b" data-source="If you know beforehand more than one good commit, you can narrow the bisect space down by specifying all of the good commits immediately after the bad commit when issuing the &lt;code&gt;bisect start&lt;/code&gt; command:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&acy;&mcy; &zcy;&acy;&rcy;&acy;&ncy;&iecy;&iecy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy; &bcy;&ocy;&lcy;&iecy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &khcy;&ocy;&rcy;&ocy;&shcy;&iecy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&ucy;&zcy;&icy;&tcy;&softcy; &pcy;&rcy;&ocy;&scy;&tcy;&rcy;&acy;&ncy;&scy;&tcy;&vcy;&ocy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;, &ucy;&kcy;&acy;&zcy;&acy;&vcy; &vcy;&scy;&iecy; &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ycy; &scy;&rcy;&acy;&zcy;&ucy; &pcy;&ocy;&scy;&lcy;&iecy; &pcy;&lcy;&ocy;&khcy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy; &pcy;&rcy;&icy; &vcy;&vcy;&ocy;&dcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>bisect start</code> :</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect start v2.<span class="hljs-number">6.20</span>-rc6 v2.<span class="hljs-number">6.20</span>-rc4 v2.<span class="hljs-number">6.20</span>-rc1 --
                   <span class="hljs-comment" title="# v2.6.20-rc6 is bad"># v2.6.20-rc6 &pcy;&lcy;&ocy;&khcy;&ocy;&jcy;</span>
                   <span class="hljs-comment" title="# v2.6.20-rc4 and v2.6.20-rc1 are good"># v2.6.20-rc4 &icy; v2.6.20-rc1 &khcy;&ocy;&rcy;&ocy;&shcy;&icy;</span></pre> </div> </div> </div> <div> <h3 class="text-body-emphasis"  id="_bisect_run"><span data-i18n="d300d73ed1303ae42655ea14abbcc3200ba7d58aeaddde6576a7cbd45c450cca/5e" data-source="Bisect run" onmousemove="i18n(this)">Bisect run</span></h3> <p><span data-i18n="40cd64360d6cd8bd70cd7266708a47e4267ec469f1cf646bf0f4d4c08e393273/63" data-source="If you have a script that can tell if the current source code is good or bad, you can bisect by issuing the command:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy;, &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&jcy; &icy;&lcy;&icy; &pcy;&lcy;&ocy;&khcy;&ocy;&jcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &kcy;&ocy;&dcy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &iecy;&gcy;&ocy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;, &vcy;&vcy;&iecy;&dcy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-javascript">$ git bisect run my_script <span class="hljs-variable language_">arguments</span></pre> </div> </div> <p><span data-i18n="5aeea4b67d9d90e61af2804e17982b3195a47977a6a06933e5a4dd81a90a468b/9d" data-source="Note that the script (&lt;code&gt;my_script&lt;/code&gt; in the above example) should exit with code 0 if the current source code is good/old, and exit with a code between 1 and 127 (inclusive), except 125, if the current source code is bad/new." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy; ( <code>my_script</code>  &vcy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ocy;&mcy; &vcy;&ycy;&shcy;&iecy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;) &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&softcy;&scy;&yacy; &scy; &kcy;&ocy;&dcy;&ocy;&mcy; 0, &iecy;&scy;&lcy;&icy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &kcy;&ocy;&dcy; &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&jcy;/&scy;&tcy;&acy;&rcy;&ycy;&jcy;, &icy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&softcy;&scy;&yacy; &scy; &kcy;&ocy;&dcy;&ocy;&mcy; &ocy;&tcy; 1 &dcy;&ocy; 127 (&vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;), &zcy;&acy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&iecy;&mcy; 125, &iecy;&scy;&lcy;&icy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &kcy;&ocy;&dcy; &pcy;&lcy;&ocy;&khcy;&ocy;&jcy;/ &ncy;&ocy;&vcy;&ycy;&jcy;.</span></p> <p><span data-i18n="771cb3316476702a623616eb259e2e63b834b55860a26ca042b7aee0d39d1881/66" data-source="Any other exit code will abort the bisect process. It should be noted that a program that terminates via &lt;code&gt;exit(-1)&lt;/code&gt; leaves $? = 255, (see the exit(3) manual page), as the value is chopped with &lt;code&gt;&amp;amp; 0377&lt;/code&gt;." onmousemove="i18n(this)">&Lcy;&yucy;&bcy;&ocy;&jcy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &kcy;&ocy;&dcy; &vcy;&ycy;&khcy;&ocy;&dcy;&acy; &pcy;&rcy;&iecy;&rcy;&vcy;&iecy;&tcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;. &Scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &ocy;&tcy;&mcy;&iecy;&tcy;&icy;&tcy;&softcy;, &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&acy;, &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&acy;&yucy;&shchcy;&acy;&yacy;&scy;&yacy; &chcy;&iecy;&rcy;&iecy;&zcy;  <code>exit(-1)</code> , &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; $? = 255 (&scy;&mcy;. &scy;&tcy;&rcy;&acy;&ncy;&icy;&tscy;&ucy; &rcy;&ucy;&kcy;&ocy;&vcy;&ocy;&dcy;&scy;&tcy;&vcy;&acy; exit(3)), &tcy;&acy;&kcy; &kcy;&acy;&kcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &ocy;&bcy;&rcy;&iecy;&zcy;&acy;&iecy;&tcy;&scy;&yacy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>&amp; 0377</code>  .</span></p> <p><span data-i18n="8c3a7efca70b7809fb93be0bd11b001cfc53ff4ee7431e08e5a34784bbd5f324/53" data-source="The special exit code 125 should be used when the current source code cannot be tested. If the script exits with this code, the current revision will be skipped (see &lt;code&gt;git bisect skip&lt;/code&gt; above). 125 was chosen as the highest sensible value to use for this purpose, because 126 and 127 are used by POSIX shells to signal specific error status (127 is for command not found, 126 is for command found but not executable&amp;mdash;&amp;ZeroWidthSpace;these details do not matter, as they are normal errors in the script, as far as &lt;code&gt;bisect run&lt;/code&gt; is concerned)." onmousemove="i18n(this)">&Scy;&pcy;&iecy;&tscy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &kcy;&ocy;&dcy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&icy;&yacy; 125 &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;, &kcy;&ocy;&gcy;&dcy;&acy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &kcy;&ocy;&dcy; &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&iecy;&ncy;. &IEcy;&scy;&lcy;&icy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&acy;&iecy;&tcy;&scy;&yacy; &scy; &ecy;&tcy;&icy;&mcy; &kcy;&ocy;&dcy;&ocy;&mcy;, &tcy;&iecy;&kcy;&ucy;&shchcy;&acy;&yacy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&rcy;&ocy;&pcy;&ucy;&shchcy;&iecy;&ncy;&acy; (&scy;&mcy;.  <code>git bisect skip</code>  &vcy;&ycy;&shcy;&iecy;). 125 &bcy;&ycy;&lcy;&ocy; &vcy;&ycy;&bcy;&rcy;&acy;&ncy;&ocy; &kcy;&acy;&kcy; &mcy;&acy;&kcy;&scy;&icy;&mcy;&acy;&lcy;&softcy;&ncy;&ocy;&iecy; &rcy;&acy;&zcy;&ucy;&mcy;&ncy;&ocy;&iecy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&jcy; &tscy;&iecy;&lcy;&icy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; 126 &icy; 127 &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&acy;&mcy;&icy; POSIX &dcy;&lcy;&yacy; &scy;&icy;&gcy;&ncy;&acy;&lcy;&icy;&zcy;&acy;&tscy;&icy;&icy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&ocy;&gcy;&ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy; &ocy;&shcy;&icy;&bcy;&kcy;&icy; (127 &mdash; &dcy;&lcy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &ncy;&iecy; &ncy;&acy;&jcy;&dcy;&iecy;&ncy;&acy;, 126 &mdash; &dcy;&lcy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &ncy;&acy;&jcy;&dcy;&iecy;&ncy;&ncy;&ocy;&jcy;, &ncy;&ocy; &ncy;&iecy;&vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&mcy;&ocy;&jcy; &mdash; &ecy;&tcy;&icy; &dcy;&iecy;&tcy;&acy;&lcy;&icy; &ncy;&iecy; &ncy;&iecy; &icy;&mcy;&iecy;&iecy;&tcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ecy;&tcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&iecy; &ocy;&shcy;&icy;&bcy;&kcy;&icy; &vcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&icy;, &chcy;&tcy;&ocy; &kcy;&acy;&scy;&acy;&iecy;&tcy;&scy;&yacy;  <code>bisect run</code> ).</span></p> <p><span data-i18n="22ba053ac305934ec87af1adbbf05894df096bf503cfc5d8a569b1ac4d219652/14" data-source="You may often find that during a bisect session you want to have temporary modifications (e.g. s/#define DEBUG 0/#define DEBUG 1/ in a header file, or &amp;quot;revision that does not have this commit needs this patch applied to work around another problem this bisection is not interested in&amp;quot;) applied to the revision being tested." onmousemove="i18n(this)">&Vcy;&ycy; &chcy;&acy;&scy;&tcy;&ocy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ocy;&bcy;&ncy;&acy;&rcy;&ucy;&zhcy;&icy;&tcy;&softcy;, &chcy;&tcy;&ocy; &vcy;&ocy; &vcy;&rcy;&iecy;&mcy;&yacy; &scy;&iecy;&acy;&ncy;&scy;&acy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, s/#define DEBUG 0/#define DEBUG 1/ &vcy; &fcy;&acy;&jcy;&lcy;&iecy; &zcy;&acy;&gcy;&ocy;&lcy;&ocy;&vcy;&kcy;&acy; &icy;&lcy;&icy;  &quot;revision that does not have this commit needs this patch applied to work around another problem this bisection is not interested in&quot; ) &pcy;&rcy;&icy;&mcy;&iecy;&ncy;&yacy;&lcy;&icy;&scy;&softcy; &kcy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ucy;&iecy;&mcy;&ocy;&jcy; &vcy;&iecy;&rcy;&scy;&icy;&icy;.</span></p> <p><span data-i18n="752563a82525ea0d1307171df48228630afc35e9701008bfdf21eb5fa659a4d8/f0" data-source="To cope with such a situation, after the inner &lt;code&gt;git bisect&lt;/code&gt; finds the next revision to test, the script can apply the patch before compiling, run the real test, and afterwards decide if the revision (possibly with the needed patch) passed the test and then rewind the tree to the pristine state. Finally the script should exit with the status of the real test to let the &lt;code&gt;git bisect run&lt;/code&gt; command loop determine the eventual outcome of the bisect session." onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &scy;&pcy;&rcy;&acy;&vcy;&icy;&tcy;&softcy;&scy;&yacy; &scy; &tcy;&acy;&kcy;&ocy;&jcy; &scy;&icy;&tcy;&ucy;&acy;&tscy;&icy;&iecy;&jcy;, &pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&icy;&jcy;  <code>git bisect</code>  &ncy;&acy;&jcy;&dcy;&iecy;&tcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&yucy; &dcy;&lcy;&yacy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;, &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &pcy;&rcy;&icy;&mcy;&iecy;&ncy;&icy;&tcy;&softcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&iecy;&rcy;&iecy;&dcy; &kcy;&ocy;&mcy;&pcy;&icy;&lcy;&yacy;&tscy;&icy;&iecy;&jcy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &tcy;&iecy;&scy;&tcy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &rcy;&iecy;&shcy;&icy;&tcy;&softcy;, &pcy;&rcy;&ocy;&shcy;&lcy;&acy; &lcy;&icy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&yacy; (&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &scy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ycy;&mcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy;&mcy;) &tcy;&iecy;&scy;&tcy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy; &pcy;&iecy;&rcy;&vcy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ocy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;. &Ncy;&acy;&kcy;&ocy;&ncy;&iecy;&tscy;, &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&softcy;&scy;&yacy; &scy;&ocy; &scy;&tcy;&acy;&tcy;&ucy;&scy;&ocy;&mcy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &tcy;&iecy;&scy;&tcy;&acy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&icy;&tcy;&softcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&mcy;&ucy; &tscy;&icy;&kcy;&lcy;&ucy;  <code>git bisect run</code>  &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ycy;&jcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy; &scy;&iecy;&acy;&ncy;&scy;&acy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;.</span></p> </div> </div> <h2 class="text-body-emphasis"  id="_options"><span data-i18n="d0db8b5e364b6989e4b8f38a2b3846b87d99a51c1592ebf35d21cc66405a8e39/b6" data-source="Options" onmousemove="i18n(this)">Options</span></h2> <div> <div> <dl> <dt id="Documentation/git-bisect.txt---no-checkout"><span data-i18n="1a2ff9e2d8ba513424dbe1bfa0e90be70d841b3d5856d9c1d8f0861d48c8b74e/e6" data-source="--no-checkout" onmousemove="i18n(this)">--no-checkout</span></dt> <dd> <p><span data-i18n="812b60eed641dd8ef0b8cb152ea1c31c62103b0007611a9e922e59ceee8f447a/79" data-source="Do not checkout the new working tree at each iteration of the bisection process. Instead just update the reference named &lt;code&gt;BISECT_HEAD&lt;/code&gt; to make it point to the commit that should be tested." onmousemove="i18n(this)">&Ncy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ncy;&acy; &kcy;&acy;&zhcy;&dcy;&ocy;&jcy; &icy;&tcy;&iecy;&rcy;&acy;&tscy;&icy;&icy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&acy; &dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&iecy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>BISECT_HEAD</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy;&acy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&lcy;&acy; &ncy;&acy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;.</span></p> <p><span data-i18n="d0b6748a6c8d601edf6d1b210205faaa133f2e616f4e65cb2d7cc4e311b48b55/8e" data-source="This option may be useful when the test you would perform in each step does not require a checked out tree." onmousemove="i18n(this)">&Ecy;&tcy;&ocy;&tcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&ocy;&lcy;&iecy;&zcy;&iecy;&ncy;, &iecy;&scy;&lcy;&icy; &tcy;&iecy;&scy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy; &bcy;&ucy;&dcy;&iecy;&tcy;&iecy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; &ncy;&acy; &kcy;&acy;&zhcy;&dcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy;, &ncy;&iecy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;.</span></p> <p><span data-i18n="016e8c56964928c27deaa552441a3649dc0046acc4092a9d1a02149b85d43014/f2" data-source="If the repository is bare, &lt;code&gt;--no-checkout&lt;/code&gt; is assumed." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy;, &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>--no-checkout</code> .</span></p> </dd> <dt id="Documentation/git-bisect.txt---first-parent"><span data-i18n="34278df80bf4695a0b9527f0ec7feae0de47a4e22d7fcf4a3c95d6a93f2d404f/da" data-source="--first-parent" onmousemove="i18n(this)">--first-parent</span></dt> <dd> <p><span data-i18n="9117b01ddd02f0d9ab921b11ddcd79e95736963f01f55095c8fb049ab0518a17/0e" data-source="Follow only the first parent commit upon seeing a merge commit." onmousemove="i18n(this)">&Scy;&lcy;&iecy;&dcy;&ucy;&jcy;&tcy;&iecy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&iecy;&rcy;&vcy;&ocy;&mcy;&ucy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&ocy;&mcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;, &ucy;&vcy;&icy;&dcy;&iecy;&vcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="4f43e430a3448f15306aa2b3916b9d07d554a5c7a872fa41759b46e8cad4973a/01" data-source="In detecting regressions introduced through the merging of a branch, the merge commit will be identified as introduction of the bug and its ancestors will be ignored." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &ocy;&bcy;&ncy;&acy;&rcy;&ucy;&zhcy;&iecy;&ncy;&icy;&icy; &rcy;&iecy;&gcy;&rcy;&iecy;&scy;&scy;&icy;&jcy;, &vcy;&ycy;&zcy;&vcy;&acy;&ncy;&ncy;&ycy;&khcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;&mcy; &vcy;&iecy;&tcy;&kcy;&icy;, &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&dcy;&iecy;&ncy;&tcy;&icy;&fcy;&icy;&tscy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&acy; &kcy;&acy;&kcy; &pcy;&ocy;&yacy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &ocy;&shcy;&icy;&bcy;&kcy;&icy;, &acy; &iecy;&iecy; &pcy;&rcy;&iecy;&dcy;&kcy;&icy; &bcy;&ucy;&dcy;&ucy;&tcy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy;.</span></p> <p><span data-i18n="051c71613dfdc7fa497aa77f20ce089ee09ec215614025151544eec9b7f81622/24" data-source="This option is particularly useful in avoiding false positives when a merged branch contained broken or non-buildable commits, but the merge itself was OK." onmousemove="i18n(this)">&Ecy;&tcy;&acy; &ocy;&pcy;&tscy;&icy;&yacy; &ocy;&scy;&ocy;&bcy;&iecy;&ncy;&ncy;&ocy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&acy; &dcy;&lcy;&yacy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&yacy; &scy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&ncy;&icy;&jcy;  false , &kcy;&ocy;&gcy;&dcy;&acy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ncy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&lcy;&acy; &ncy;&iecy;&rcy;&acy;&bcy;&ocy;&tcy;&acy;&yucy;&shchcy;&icy;&iecy; &icy;&lcy;&icy; &ncy;&iecy; &pcy;&ocy;&dcy;&lcy;&iecy;&zhcy;&acy;&shchcy;&icy;&iecy; &scy;&bcy;&ocy;&rcy;&kcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ycy;, &ncy;&ocy; &scy;&acy;&mcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &pcy;&rcy;&ocy;&shcy;&lcy;&ocy; &ncy;&ocy;&rcy;&mcy;&acy;&lcy;&softcy;&ncy;&ocy;.</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_examples"><span data-i18n="e68ee04dff59551b7d1ae07a2f8a00dc61d841628948da3d2781630706a05e92/38" data-source="Examples" onmousemove="i18n(this)">Examples</span></h2> <div> <div> <ul> <li> <p><span data-i18n="401fb39aa9ccd39e2e1677dd03f86090a017d82b1a648a871ca7ab9a4128e75b/a5" data-source="Automatically bisect a broken build between v1.2 and HEAD:" onmousemove="i18n(this)">&Acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &scy;&lcy;&ocy;&mcy;&acy;&ncy;&ncy;&ucy;&yucy; &scy;&bcy;&ocy;&rcy;&kcy;&ucy; &mcy;&iecy;&zhcy;&dcy;&ucy; v1.2 &icy; HEAD:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect start <span class="hljs-variable constant_">HEAD</span> v1.<span class="hljs-number">2</span> --      <span class="hljs-comment" title="# HEAD is bad, v1.2 is good"># HEAD &mdash; &pcy;&lcy;&ocy;&khcy;&ocy;, v1.2 &mdash; &khcy;&ocy;&rcy;&ocy;&shcy;&ocy;</span>
<span class="hljs-variable">$ </span>git bisect run make                <span class="hljs-comment" title="# &quot;make&quot; builds the app">#  &quot;make&quot;  &scy;&ocy;&bcy;&icy;&rcy;&acy;&iecy;&tcy; &pcy;&rcy;&icy;&lcy;&ocy;&zhcy;&iecy;&ncy;&icy;&iecy;</span>
<span class="hljs-variable">$ </span>git bisect reset                   <span class="hljs-comment"># quit the bisect session</span></pre> </div> </div> </li> <li> <p><span data-i18n="45bac92ca1bc2e83abf1236533a758fcaaec12358c8b252662f979e497f83f4c/9d" data-source="Automatically bisect a test failure between origin and HEAD:" onmousemove="i18n(this)">&Acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &ocy;&tcy;&kcy;&acy;&zcy; &tcy;&iecy;&scy;&tcy;&acy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &mcy;&iecy;&zhcy;&dcy;&ucy; &icy;&scy;&tcy;&ocy;&chcy;&ncy;&icy;&kcy;&ocy;&mcy; &icy; HEAD:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git bisect start HEAD origin --    <span class="hljs-comment" title="# HEAD is bad, origin is good"># HEAD &pcy;&lcy;&ocy;&khcy;&ocy;&jcy;, origin &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&jcy;</span></span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git bisect run make <span class="hljs-built_in">test</span>           <span class="hljs-comment" title="# &quot;make test&quot; builds and tests">#  &quot;make test&quot;  &scy;&tcy;&rcy;&ocy;&icy;&tcy; &icy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ucy;&iecy;&tcy;</span></span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git bisect reset                   <span class="hljs-comment"># quit the bisect session</span></span></pre> </div> </div> </li> <li> <p><span data-i18n="3318710c0003635748a8096f403d5e2eff8b8086c312725c563dc237ba5eef9d/d4" data-source="Automatically bisect a broken test case:" onmousemove="i18n(this)">&Acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &scy;&lcy;&ocy;&mcy;&acy;&ncy;&ncy;&ycy;&jcy; &tcy;&iecy;&scy;&tcy;&ocy;&vcy;&ycy;&jcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;:</span></p> <div> <div> <pre class="hljs language-bash">$ <span class="hljs-built_in">cat</span> ~/test.sh
<span class="hljs-comment">#!/bin/sh</span>
make || <span class="hljs-built_in">exit</span> 125                     <span class="hljs-comment" title="# this skips broken builds"># &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy; &ncy;&iecy;&rcy;&acy;&bcy;&ocy;&tcy;&acy;&yucy;&shchcy;&icy;&iecy; &scy;&bcy;&ocy;&rcy;&kcy;&icy;</span>
~/check_test_case.sh                 <span class="hljs-comment" title="# does the test case pass?"># &Pcy;&rcy;&ocy;&jcy;&dcy;&iecy;&ncy; &lcy;&icy; &tcy;&iecy;&scy;&tcy;&ocy;&vcy;&ycy;&jcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;?</span>
$ git bisect start HEAD HEAD~10 --   <span class="hljs-comment"># culprit is among the last 10</span>
$ git bisect run ~/test.sh
$ git bisect reset                   <span class="hljs-comment"># quit the bisect session</span></pre> </div> </div> <p><span data-i18n="c478068edf507241460133d9753e005e1c5af8797df0f3e9d4f7f73bc224fabb/f5" data-source="Here we use a &lt;code&gt;test.sh&lt;/code&gt; custom script. In this script, if &lt;code&gt;make&lt;/code&gt; fails, we skip the current commit. &lt;code&gt;check_test_case.sh&lt;/code&gt; should &lt;code&gt;exit 0&lt;/code&gt; if the test case passes, and &lt;code&gt;exit 1&lt;/code&gt; otherwise." onmousemove="i18n(this)">&Zcy;&dcy;&iecy;&scy;&softcy; &mcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&jcy; &scy;&kcy;&rcy;&icy;&pcy;&tcy;  <code>test.sh</code> . &Vcy; &ecy;&tcy;&ocy;&mcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&icy; &vcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &scy;&bcy;&ocy;&yacy;  <code>make</code>  &mcy;&ycy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&mcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&ucy;&yucy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;.  <code>check_test_case.sh</code>  &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy;  <code>exit 0</code> , &iecy;&scy;&lcy;&icy; &tcy;&iecy;&scy;&tcy;&ocy;&vcy;&ycy;&jcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy; &pcy;&rcy;&ocy;&jcy;&dcy;&iecy;&ncy;, &icy;  <code>exit 1</code>  &vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;.</span></p> <p><span data-i18n="cb2a8adfd24a18429e1174bbd00fd12b35dc4839afe9142243a60deafa7eb3a1/e8" data-source="It is safer if both &lt;code&gt;test.sh&lt;/code&gt; and &lt;code&gt;check_test_case.sh&lt;/code&gt; are outside the repository to prevent interactions between the bisect, make and test processes and the scripts." onmousemove="i18n(this)">&Bcy;&iecy;&zcy;&ocy;&pcy;&acy;&scy;&ncy;&iecy;&iecy;, &iecy;&scy;&lcy;&icy; &icy;  <code>test.sh</code> , &icy;  <code>check_test_case.sh</code>  &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&tcy;&scy;&yacy; &zcy;&acy; &pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&acy;&mcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &vcy;&zcy;&acy;&icy;&mcy;&ocy;&dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&iecy; &mcy;&iecy;&zhcy;&dcy;&ucy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&acy;&mcy;&icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy;, &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy; &icy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &icy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&yacy;&mcy;&icy;.</span></p> </li> <li> <p><span data-i18n="d6f815cd575aea23dec412823b90797df6bd80f006a845e9d3a83e925b09605d/27" data-source="Automatically bisect with temporary modifications (hot-fix):" onmousemove="i18n(this)">&Acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy; &scy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;&mcy;&icy; (&icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy;):</span></p> <div> <div> <pre class="hljs language-bash">$ <span class="hljs-built_in">cat</span> ~/test.sh
<span class="hljs-comment">#!/bin/sh</span>

<span class="hljs-comment" title="# tweak the working tree by merging the hot-fix branch"># &ncy;&acy;&scy;&tcy;&rcy;&acy;&icy;&vcy;&acy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&yacy; &vcy;&iecy;&tcy;&kcy;&ucy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&jcy;</span>
<span class="hljs-comment" title="# and then attempt a build"># &icy; &zcy;&acy;&tcy;&iecy;&mcy; &pcy;&ocy;&pcy;&ycy;&tcy;&acy;&iecy;&mcy;&scy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &scy;&bcy;&ocy;&rcy;&kcy;&ucy;</span>
<span class="hljs-keyword">if</span>        git merge --no-commit --no-ff hot-fix &amp;&amp;
        make
<span class="hljs-keyword">then</span>
        <span class="hljs-comment" title="# run project specific test and report its status"># &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy; &tcy;&iecy;&scy;&tcy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &icy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&softcy; &ocy; &iecy;&gcy;&ocy; &scy;&tcy;&acy;&tcy;&ucy;&scy;&iecy;</span>
        ~/check_test_case.sh
        status=$?
<span class="hljs-keyword">else</span>
        <span class="hljs-comment" title="# tell the caller this is untestable"># &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&mcy; &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&yucy;&shchcy;&iecy;&mcy;&ucy; &acy;&bcy;&ocy;&ncy;&iecy;&ncy;&tcy;&ucy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &ncy;&iecy;&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;&softcy;</span>
        status=125
<span class="hljs-keyword">fi</span>

<span class="hljs-comment" title="# undo the tweak to allow clean flipping to the next commit"># &ocy;&tcy;&mcy;&iecy;&ncy;&icy;&tcy;&iecy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&ucy;, &chcy;&tcy;&ocy;&bcy;&ycy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&softcy; &chcy;&icy;&scy;&tcy;&ycy;&jcy; &pcy;&iecy;&rcy;&iecy;&khcy;&ocy;&dcy; &kcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&mcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;</span>
git reset --hard

<span class="hljs-comment" title="# return control"># &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&tcy; &ucy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;</span>
<span class="hljs-built_in">exit</span> <span class="hljs-variable">$status</span></pre> </div> </div> <p><span data-i18n="646963a7ff1d0a9b4605282162d244e1e09f463d57b8400ff76643563d0eec4d/64" data-source="This applies modifications from a hot-fix branch before each test run, e.g. in case your build or test environment changed so that older revisions may need a fix which newer ones have already. (Make sure the hot-fix branch is based off a commit which is contained in all revisions which you are bisecting, so that the merge does not pull in too much, or use &lt;code&gt;git cherry-pick&lt;/code&gt; instead of &lt;code&gt;git merge&lt;/code&gt;.)" onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &pcy;&rcy;&icy;&mcy;&iecy;&ncy;&yacy;&iecy;&tcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &icy;&zcy; &vcy;&iecy;&tcy;&kcy;&icy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&jcy; &pcy;&iecy;&rcy;&iecy;&dcy; &kcy;&acy;&zhcy;&dcy;&ycy;&mcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&ocy;&mcy; &tcy;&iecy;&scy;&tcy;&acy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &vcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &iecy;&scy;&lcy;&icy; &vcy;&acy;&shcy;&acy; &scy;&rcy;&iecy;&dcy;&acy; &scy;&bcy;&ocy;&rcy;&kcy;&icy; &icy;&lcy;&icy; &tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&acy;&scy;&softcy; &tcy;&acy;&kcy;, &chcy;&tcy;&ocy; &bcy;&ocy;&lcy;&iecy;&iecy; &scy;&tcy;&acy;&rcy;&ycy;&iecy; &vcy;&iecy;&rcy;&scy;&icy;&icy; &mcy;&ocy;&gcy;&ucy;&tcy; &ncy;&ucy;&zhcy;&dcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &ucy;&zhcy;&iecy; &iecy;&scy;&tcy;&softcy; &vcy; &bcy;&ocy;&lcy;&iecy;&iecy; &ncy;&ocy;&vcy;&ycy;&khcy;. (&Ucy;&bcy;&iecy;&dcy;&icy;&tcy;&iecy;&scy;&softcy;, &chcy;&tcy;&ocy; &vcy;&iecy;&tcy;&vcy;&softcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &ocy;&scy;&ncy;&ocy;&vcy;&acy;&ncy;&acy; &ncy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy;&scy;&yacy; &vcy;&ocy; &vcy;&scy;&iecy;&khcy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&yacy;&khcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &dcy;&iecy;&lcy;&icy;&tcy;&iecy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ncy;&iecy; &zcy;&acy;&ncy;&icy;&mcy;&acy;&lcy;&ocy; &scy;&lcy;&icy;&shcy;&kcy;&ocy;&mcy; &mcy;&ncy;&ocy;&gcy;&ocy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy;, &icy;&lcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git cherry-pick</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy;  <code>git merge</code>  .)</span></p> </li> <li> <p><span data-i18n="3318710c0003635748a8096f403d5e2eff8b8086c312725c563dc237ba5eef9d/d4" data-source="Automatically bisect a broken test case:" onmousemove="i18n(this)">&Acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &scy;&lcy;&ocy;&mcy;&acy;&ncy;&ncy;&ycy;&jcy; &tcy;&iecy;&scy;&tcy;&ocy;&vcy;&ycy;&jcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy; &pcy;&ocy;&pcy;&ocy;&lcy;&acy;&mcy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect start <span class="hljs-variable constant_">HEAD</span> <span class="hljs-variable constant_">HEAD</span>~<span class="hljs-number">10</span> --   <span class="hljs-comment" title="# culprit is among the last 10"># &vcy;&icy;&ncy;&ocy;&vcy;&ncy;&icy;&kcy; &vcy;&khcy;&ocy;&dcy;&icy;&tcy; &vcy; &chcy;&icy;&scy;&lcy;&ocy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&khcy; 10</span>
<span class="hljs-variable">$ </span>git bisect run sh -c <span class="hljs-string">&quot;make || exit 125; ~/check_test_case.sh&quot;</span>
<span class="hljs-variable">$ </span>git bisect reset                   <span class="hljs-comment"># quit the bisect session</span></pre> </div> </div> <p><span data-i18n="286366063f0930f89bc6ff653fa88dff2afc7a5e0bf13b8246d0c9685c040e5e/f1" data-source="This shows that you can do without a run script if you write the test on a single line." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ocy;&bcy;&ocy;&jcy;&tcy;&icy;&scy;&softcy; &icy; &bcy;&iecy;&zcy; &scy;&kcy;&rcy;&icy;&pcy;&tcy;&acy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;, &iecy;&scy;&lcy;&icy; &pcy;&icy;&scy;&acy;&tcy;&softcy; &tcy;&iecy;&scy;&tcy; &vcy; &ocy;&dcy;&ncy;&ucy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy;.</span></p> </li> <li> <p><span data-i18n="88b26f93208b2eaf3f529ba7f7eaf2e65e856a6b9daaada084f430b6a89f6c09/09" data-source="Locate a good region of the object graph in a damaged repository" onmousemove="i18n(this)">&Ncy;&acy;&jcy;&dcy;&icy;&tcy;&iecy; &khcy;&ocy;&rcy;&ocy;&shcy;&ucy;&yucy; &ocy;&bcy;&lcy;&acy;&scy;&tcy;&softcy; &gcy;&rcy;&acy;&fcy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &vcy; &pcy;&ocy;&vcy;&rcy;&iecy;&zhcy;&dcy;&iecy;&ncy;&ncy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git bisect start <span class="hljs-variable constant_">HEAD</span> &lt;known-good-commit&gt; [ &lt;boundary-commit&gt; ... ] --no-checkout
<span class="hljs-variable">$ </span>git bisect run sh -c <span class="hljs-string">&apos;
        GOOD=$(git for-each-ref &quot;--format=%(objectname)&quot; refs/bisect/good-*) &amp;&amp;
        git rev-list --objects BISECT_HEAD --not $GOOD &gt;tmp.$$ &amp;&amp;
        git pack-objects --stdout &gt;/dev/null &lt;tmp.$$
        rc=$?
        rm -f tmp.$$
        test $rc = 0&apos;</span>

<span class="hljs-variable">$ </span>git bisect reset                   <span class="hljs-comment" title="# quit the bisect session"># &vcy;&ycy;&khcy;&ocy;&dcy;&icy;&mcy; &icy;&zcy; &scy;&iecy;&acy;&ncy;&scy;&acy; bisect</span></pre> </div> </div> <p><span data-i18n="a55e860feaa748bfc868ca290700ff40eb142c7f9d1bd6e91abc473de724347d/10" data-source="In this case, when &lt;code&gt;git bisect run&lt;/code&gt; finishes, bisect/bad will refer to a commit that has at least one parent whose reachable graph is fully traversable in the sense required by &lt;code&gt;git pack objects&lt;/code&gt;." onmousemove="i18n(this)">&Vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &kcy;&ocy;&gcy;&dcy;&acy;  <code>git bisect run</code>  &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&tcy;&scy;&yacy;, bisect/bad &bcy;&ucy;&dcy;&iecy;&tcy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&softcy;&scy;&yacy; &kcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;, &ucy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &iecy;&scy;&tcy;&softcy; &khcy;&ocy;&tcy;&yacy; &bcy;&ycy; &ocy;&dcy;&icy;&ncy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&icy;&jcy; &ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;, &chcy;&iecy;&jcy; &dcy;&ocy;&scy;&tcy;&icy;&zhcy;&icy;&mcy;&ycy;&jcy; &gcy;&rcy;&acy;&fcy; &pcy;&ocy;&lcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy; &pcy;&rcy;&ocy;&khcy;&ocy;&dcy;&icy;&mcy; &vcy; &scy;&mcy;&ycy;&scy;&lcy;&iecy;, &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&mcy;&ocy;&mcy;  <code>git pack objects</code> .</span></p> </li> <li> <p><span data-i18n="15ad7ed9b244b9f227b5b855784fa01e53340d4033826c83cd4379235cb28587/c4" data-source="Look for a fix instead of a regression in the code" onmousemove="i18n(this)">&Icy;&shchcy;&icy;&tcy;&iecy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy;, &acy; &ncy;&iecy; &rcy;&iecy;&gcy;&rcy;&iecy;&scy;&scy;&icy;&yucy; &vcy; &kcy;&ocy;&dcy;&iecy;.</span></p> <div> <div> <pre class="hljs language-sql">$ git bisect <span class="hljs-keyword">start</span>
$ git bisect <span class="hljs-keyword">new</span> HEAD    # <span class="hljs-keyword">current</span> <span class="hljs-keyword">commit</span> <span class="hljs-keyword">is</span> marked <span class="hljs-keyword">as</span> <span class="hljs-keyword">new</span>
$ git bisect <span class="hljs-keyword">old</span> HEAD<span class="hljs-operator">~</span><span class="hljs-number">10</span> # the tenth <span class="hljs-keyword">commit</span> <span class="hljs-keyword">from</span> now <span class="hljs-keyword">is</span> marked <span class="hljs-keyword">as</span> <span class="hljs-keyword">old</span></pre> </div> </div> <p><span data-i18n="533fd7aab37e48dc1810d2032762d442ac4268c29affe636695ae0b0d22e803b/ee" data-source="or:" onmousemove="i18n(this)">or:</span></p> </li> </ul> </div> <div> <div> <pre class="hljs language-scss">$ git bisect start <span class="hljs-attr">--term-old</span> broken <span class="hljs-attr">--term-new</span> fixed
$ git bisect fixed
$ git bisect broken HEAD~<span class="hljs-number">10</span></pre> </div> </div> <div> <h3 class="text-body-emphasis"  id="_getting_help"><span data-i18n="418313b75b185ab8d25783bb2dd96976be1b058243ed5c67c932e8d7b85da5d5/c1" data-source="Getting help" onmousemove="i18n(this)">Getting help</span></h3> <p><span data-i18n="eb515a6b4d8fe84b304d9d1aedb810a03f7db4119708c52ac3f61be5047c4b98/ae" data-source="Use &lt;code&gt;git bisect&lt;/code&gt; to get a short usage description, and &lt;code&gt;git bisect
help&lt;/code&gt; or &lt;code&gt;git bisect -h&lt;/code&gt; to get a long usage description." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git bisect</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &kcy;&rcy;&acy;&tcy;&kcy;&ocy;&iecy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;, &icy;  <code>git bisect
help</code>  &icy;&lcy;&icy;  <code>git bisect -h</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&iecy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;.</span></p> </div> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="28965e9fb502d368ce4bf1fe555fe247cd5f4d533de02389c5ab37087326e298/97" data-source="&lt;a href=&quot;git-bisect-lk2009&quot;&gt;Fighting regressions with git bisect&lt;/a&gt;, &lt;a href=&quot;git-blame&quot;&gt;git-blame[1]&lt;/a&gt;." onmousemove="i18n(this)"><a href="git-bisect-lk2009.html">Fighting regressions with git bisect</a> ,  <a href="git-blame.html">git-blame[1]</a> .</span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-bisect">https://git-scm.com/docs/git-bisect</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                               <ins class="adsbygoogle"
        style="display:block"
        data-ad-format="autorelaxed"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="7867651344"></ins>
   <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
   </script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-bisect-lk2009.html">
                            git bisect-lk2009                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-blame.html">
                            git blame                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-branch.html">
                            git branch                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-bugreport.html">
                            git bugreport                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-bundle.html">
                            git bundle                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-cat-file.html">
                            git cat-file                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-check-attr.html">
                            git check-attr                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-bisect.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>